package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Notify entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "NOTIFY")
public class Notify implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -9058099438058929025L;

    // Fields    
    private Long id;
    private Long eventId;
    private String user;
    private Integer notifyMode;
    private Date time;
    private String msg;
    private String msgExpr;
    private Long notifyRuleId;

    // Constructors

    /** default constructor */
    public Notify() {
    }

    /** minimal constructor */
    public Notify(Long id) {
        this.id = id;
    }

    /** full constructor */
    public Notify(Long id, Long eventId, String user, Integer notifyMode, Date time, String msg, String msgExpr, Long notifyRuleId) {
        this.id = id;
        this.eventId = eventId;
        this.user = user;
        this.notifyMode = notifyMode;
        this.time = time;
        this.msg = msg;
        this.msgExpr = msgExpr;
        this.notifyRuleId = notifyRuleId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "NOTIFY_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "EVENT_ID", precision = 18, scale = 0)
    public Long getEventId() {
        return this.eventId;
    }

    public void setEventId(Long eventId) {
        this.eventId = eventId;
    }

    @Column(name = "USER_", length = 128)
    public String getUser() {
        return this.user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    @Column(name = "NOTIFY_MODE", precision = 1, scale = 0)
    public Integer getNotifyMode() {
        return this.notifyMode;
    }

    public void setNotifyMode(Integer notifyMode) {
        this.notifyMode = notifyMode;
    }

    @Column(name = "TIME", length = 7)
    public Date getTime() {
        return this.time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Column(name = "MSG", length = 2048)
    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "MSG_EXPR", length = 1024)
    public String getMsgExpr() {
        return this.msgExpr;
    }

    public void setMsgExpr(String msgExpr) {
        this.msgExpr = msgExpr;
    }

    @Column(name = "NOTIFY_RULE_ID", precision = 18, scale = 0)
    public Long getNotifyRuleId() {
        return this.notifyRuleId;
    }

    public void setNotifyRuleId(Long notifyRuleId) {
        this.notifyRuleId = notifyRuleId;
    }

    @Override
    public String toString() {
        return "Notify [id=" + id + ", eventId=" + eventId + ", user=" + user + ", notifyMode=" + notifyMode + ", time=" + time + ", msg=" + msg + ", msgExpr=" + msgExpr + ", notifyRuleId=" + notifyRuleId + "]";
    }

}